package com.team.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 药方表
 * @TableName prescription
 */
@TableName(value ="prescription")
public class Prescription implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 挂号单表主键ID
     */
    private Long registryId;

    /**
     * 病人表主键ID
     */
    private Long patientId;

    /**
     * 支付状态 1-->待支付；2-->支付成功；3-->支付失败；4-->超时未支付
     */
    private Integer payStatus;

    /**
     * 是否取药 1-->未取药；2-->已取药
     */
    private Integer isFetchMedicine;

    /**
     * 总金额(￥)
     */
    private BigDecimal fee;

    /**
     * 实际支付金额(￥)
     */
    private BigDecimal payFee;

    /**
     * 医保报销金额(￥)
     */
    private BigDecimal medicareFee;

    /**
     * 支付时间
     */
    private Date payTime;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 修改时间
     */
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 挂号单表主键ID
     */
    public Long getRegistryId() {
        return registryId;
    }

    /**
     * 挂号单表主键ID
     */
    public void setRegistryId(Long registryId) {
        this.registryId = registryId;
    }

    /**
     * 病人表主键ID
     */
    public Long getPatientId() {
        return patientId;
    }

    /**
     * 病人表主键ID
     */
    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    /**
     * 支付状态 1-->待支付；2-->支付成功；3-->支付失败；4-->超时未支付
     */
    public Integer getPayStatus() {
        return payStatus;
    }

    /**
     * 支付状态 1-->待支付；2-->支付成功；3-->支付失败；4-->超时未支付
     */
    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    /**
     * 是否取药 1-->未取药；2-->已取药
     */
    public Integer getIsFetchMedicine() {
        return isFetchMedicine;
    }

    /**
     * 是否取药 1-->未取药；2-->已取药
     */
    public void setIsFetchMedicine(Integer isFetchMedicine) {
        this.isFetchMedicine = isFetchMedicine;
    }

    /**
     * 总金额(￥)
     */
    public BigDecimal getFee() {
        return fee;
    }

    /**
     * 总金额(￥)
     */
    public void setFee(BigDecimal fee) {
        this.fee = fee;
    }

    /**
     * 实际支付金额(￥)
     */
    public BigDecimal getPayFee() {
        return payFee;
    }

    /**
     * 实际支付金额(￥)
     */
    public void setPayFee(BigDecimal payFee) {
        this.payFee = payFee;
    }

    /**
     * 医保报销金额(￥)
     */
    public BigDecimal getMedicareFee() {
        return medicareFee;
    }

    /**
     * 医保报销金额(￥)
     */
    public void setMedicareFee(BigDecimal medicareFee) {
        this.medicareFee = medicareFee;
    }

    /**
     * 支付时间
     */
    public Date getPayTime() {
        return payTime;
    }

    /**
     * 支付时间
     */
    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    /**
     * 创建时间
     */
    public Date getCreatedTime() {
        return createdTime;
    }

    /**
     * 创建时间
     */
    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    /**
     * 修改时间
     */
    public Date getUpdatedTime() {
        return updatedTime;
    }

    /**
     * 修改时间
     */
    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Prescription other = (Prescription) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRegistryId() == null ? other.getRegistryId() == null : this.getRegistryId().equals(other.getRegistryId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getPayStatus() == null ? other.getPayStatus() == null : this.getPayStatus().equals(other.getPayStatus()))
            && (this.getIsFetchMedicine() == null ? other.getIsFetchMedicine() == null : this.getIsFetchMedicine().equals(other.getIsFetchMedicine()))
            && (this.getFee() == null ? other.getFee() == null : this.getFee().equals(other.getFee()))
            && (this.getPayFee() == null ? other.getPayFee() == null : this.getPayFee().equals(other.getPayFee()))
            && (this.getMedicareFee() == null ? other.getMedicareFee() == null : this.getMedicareFee().equals(other.getMedicareFee()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getPayStatus() == null) ? 0 : getPayStatus().hashCode());
        result = prime * result + ((getIsFetchMedicine() == null) ? 0 : getIsFetchMedicine().hashCode());
        result = prime * result + ((getFee() == null) ? 0 : getFee().hashCode());
        result = prime * result + ((getPayFee() == null) ? 0 : getPayFee().hashCode());
        result = prime * result + ((getMedicareFee() == null) ? 0 : getMedicareFee().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", registryId=").append(registryId);
        sb.append(", patientId=").append(patientId);
        sb.append(", payStatus=").append(payStatus);
        sb.append(", isFetchMedicine=").append(isFetchMedicine);
        sb.append(", fee=").append(fee);
        sb.append(", payFee=").append(payFee);
        sb.append(", medicareFee=").append(medicareFee);
        sb.append(", payTime=").append(payTime);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}